import axios from 'axios';

const prefix = '/api/comment';

export function addComment({ blogId, userId, content, parentId }) {
  return axios.post(`${prefix}/add.do`, {
    blogid: blogId,
    userid: userId,
    content,
    parentid: parentId
  });
}

export function getComments(blogId) {
  return axios.get(`${prefix}/list.do`, { params: { blogid: blogId } });
} 